[MISC] Move register-tile Cholesky into quadrants.#2860
Conversation
Delete `genesis/utils/_tile16.py` and `_tile32.py`, whose contents (the inlined column-setter cascades + qd.static-unrolled cholesky_ body) now live in `quadrants/lang/simt/_tile16.py` and `_tile32.py` upstream. The constraint solver switches from `Tile16x16Cholesky` / `Tile32x32Cholesky` to `qd.simt.Tile16x16` / `qd.simt.Tile32x32`, and the blocked-Cholesky bodies go back to the readable slice syntax (`tile[:] = arr[r:r2, c:c2]`, `tile -= qd.outer(v, v)`) instead of the explicit `_load3d` / `_store3d` / `_resolve_vec3d` / `_ger_sub` private calls that were required while two distinct tile classes co-existed in one kernel. Pairs with quadrants PR hp/import-tiles-from-genesis.
| @@ -2130,11 +2125,11 @@ def func_cholesky_and_solve_fused_tiled( | |||
| """Tile-size dispatcher; see _cholesky_and_solve_fused_tiled_impl for the algorithm and dispatch rule.""" | |||
| if qd.static(static_rigid_sim_config.cholesky_tile_size == 32): | |||
| _cholesky_and_solve_fused_tiled_impl( | |||
| constraint_state, rigid_global_info, static_rigid_sim_config, Tile32x32Cholesky, write_L_to_nt_H | |||
| constraint_state, rigid_global_info, static_rigid_sim_config, qd.simt.Tile32x32, write_L_to_nt_H | |||
| ) | |||
| else: | |||
| _cholesky_and_solve_fused_tiled_impl( | |||
| constraint_state, rigid_global_info, static_rigid_sim_config, Tile16x16Cholesky, write_L_to_nt_H | |||
| constraint_state, rigid_global_info, static_rigid_sim_config, qd.simt.Tile16x16, write_L_to_nt_H | |||
| ) | |||
There was a problem hiding this comment.
Would it be possible to have qd.simt.Tile that accept static "size" argument, so that ce can pass size as input argument instead of entire class? This would be more idiomatic.
There was a problem hiding this comment.
And even more natural and cleaner, because you would just have to pass "static_rigid_sim_config.cholesky_tile_size" directly inside _cholesky_and_solve_fused_tiled_impl instead of adding one more indirection level as it is currently the case.
There was a problem hiding this comment.
would be better to comment these on the quadrants-side PR. I've already merged that though.
There was a problem hiding this comment.
(No way to modify such parameters from genesis side)
|
🔴 Benchmark Regression Detected ➡️ Report |
|
🙌 |
Delete
genesis/utils/_tile16.pyand_tile32.py, whose contents (the inlined column-setter cascades + qd.static-unrolled cholesky_ body) now live inquadrants/lang/simt/_tile16.pyand_tile32.pyupstream. The constraint solver switches fromTile16x16Cholesky/Tile32x32Choleskytoqd.simt.Tile16x16/qd.simt.Tile32x32, and the blocked-Cholesky bodies go back to the readable slice syntax (tile[:] = arr[r:r2, c:c2],tile -= qd.outer(v, v)) instead of the explicit_load3d/_store3d/_resolve_vec3d/_ger_subprivate calls that were required while two distinct tile classes co-existed in one kernel.Pairs with quadrants PR hp/import-tiles-from-genesis.
Description
Related Issue
Resolves Genesis-Embodied-AI/Genesis#
Motivation and Context
How Has This Been / Can This Be Tested?
Screenshots (if appropriate):
Checklist:
Submitting Code Changessection of CONTRIBUTING document.